<div class="cms_browse_heading">
	<div class="cms_browse_heading_label">
		<h1>Browse Groups</h1>
	</div>
	<div class="cms_browse_addrecord">
<?

	//need to add permissions here.. to check that we can add users???
	//assume if we are admin that we can
	$addUrl = '/cms/html/index.php?fileNo=10';
	print <<< EOD
		<a href="$addUrl"><img src="/cms/images/cnt_add_new_record.gif" /></a>
EOD;
?>
	</div>
</div>
<div id="cms_browse_topdivider" class="cms_browse_divider"></div>
<div id="cms_browse">
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="cms_browsetext">
	<tr> 
	  <td  width="45"><b><a  href="index.php?fileNo=8&sorts=gid">Id</a></b></td>
	  <td><b><a  href="index.php?fileNo=8&sorts=groupname">Name</a></b></td>	  
	  <td></td>	  
	  <td width="75"><b>Action</b></td>
	</tr>
<?//index.php?fileNo=10
	$sorts = extractStringWithKeyFromArray("sorts", $_REQUEST);
	$query = "Select * From grouplist ";
	if(isset($sorts)) {
		$query .= " Order by $sorts ";
	}
	$db->executeQuery($query);                
	while(($row = $db->nextObject())){		

?>
	<tr> 
	  <td colspan="4"> <img src="/cms/images/greyline.gif" width="100%" height="7"></td>
	</tr>
    <tr> 
      <td width="45">
      	<? print($row->gid); ?></td>
      <td > 
<? 
		print($row->groupname); 
?> 
      </td>
      <td><img src="/cms/images/spacer.gif" width="1" height="20" /></td>            
      <td ><a href="index.php?fileNo=10&gid=<? print($row->gid); ?>" >Edit</a> 
        / <a href="index.php?fileNo=12&gid=<? print($row->gid); ?>" >Delete</a> 
      </td>
    </tr>
<?
	}
?>
	<tr> 
	  <td colspan="4"> <img src="/cms/images/greyline.gif" width="100%" height="7"></td>
	</tr>
</table>
</div>